﻿using Eneta.Portal.Forum.Core.Data;
using Eneta.Portal.Forum.Core.Domain.Collections;
using Eneta.Portal.Forum.Core.Domain.Entities;

namespace Eneta.Portal.Forum.Core.Domain.Repositories
{
    public class ForumUserRepository
    {
        // Fields
        private readonly ForumUserDao _dao = new ForumUserDao();

        // Methods
        public ForumUserCollection GetAll()
        {
            return _dao.GetAll();
        }

        public ForumUser GetById(int id)
        {
            return _dao.GetById(id);
        }

        public ForumUser GetBySharePointId(int id)
        {
            return _dao.GetBySharePointId(id);
        }

        public int GetCount()
        {
            return _dao.Count;
        }

        public ForumUser GetLast()
        {
            return _dao.GetLast();
        }

        public int Save(ForumUser user)
        {
            return _dao.Save(user);
        }
    }
}
